Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: fix handle poolcoordinator certificates in case of restarting… #1187

Merged

Conversation

batthebee
Copy link
Contributor

@batthebee batthebee commented Feb 5, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

as mentioned in #1182 there is an issue, when restarting yurt-controller-manger.
The pool-coordinator-dynamic-certs secret doesn't contain 127.0.0.1as valid destination, which causes errors on pool-coordinators etcd.

Which issue(s) this PR fixes:

Fixes only some parts of #1182

Special notes for your reviewer:

There were two problems. The first one was, that the configuration containing the 127.0.0.1 was overwritten by the init method. The second one was to compare an array with net.IPs by deepEqual.

Does this PR introduce a user-facing change?

None

@openyurt-bot openyurt-bot added kind/bug kind/bug size/M size/M: 30-99 labels Feb 5, 2023
@openyurt-bot
Copy link
Collaborator

Welcome @batthebee! It looks like this is your first PR to openyurtio/openyurt 🎉

@batthebee
Copy link
Contributor Author

If you want to make a short test, here is the latest image: docker.io/batthebee/yurt-controller-manager:latest

@rambohe-ch
Copy link
Member

@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #1187 (f6693fb) into master (a36f3be) will increase coverage by 0.04%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #1187      +/-   ##
==========================================
+ Coverage   52.16%   52.20%   +0.04%     
==========================================
  Files         110      110              
  Lines       13848    13852       +4     
==========================================
+ Hits         7224     7232       +8     
+ Misses       5977     5973       -4     
  Partials      647      647              
Flag Coverage Δ
unittests 52.20% <66.66%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...olcoordinator/cert/poolcoordinator_cert_manager.go 12.56% <0.00%> (+0.26%) ⬆️
pkg/controller/poolcoordinator/cert/certificate.go 49.83% <100.00%> (-0.67%) ⬇️
pkg/util/ip/ip.go 60.00% <100.00%> (+11.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rambohe-ch
Copy link
Member

@batthebee Thank you for posting pull request to fix bug. It looks like that unit tests coverage is not enough, how about add some unit tests for changed code?

@rambohe-ch
Copy link
Member

/backport release-v1.2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Only merged pull requests can be backported.

@openyurt-bot openyurt-bot added the approved approved label Feb 7, 2023
@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: batthebee, luc99hen, rambohe-ch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot merged commit 5880dfb into openyurtio:master Feb 7, 2023
@rambohe-ch
Copy link
Member

/backport release-v1.2

@rambohe-ch rambohe-ch added the backport release-v1.2 backport release-v1.2 label Feb 7, 2023
@rambohe-ch
Copy link
Member

/backport release-v1.2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Successfully created backport PR #1193 for release-v1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved backport release-v1.2 backport release-v1.2 kind/bug kind/bug lgtm lgtm size/M size/M: 30-99
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants